<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ page import="performReservation.SMMDBBean"%>
<%@ page import="java.sql.*"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Processing...</title>
</head>
<body>
	<%
	String email = request.getParameter("email");
	String passwd = request.getParameter("password");
	String address = request.getParameter("address");
	String name = request.getParameter("name");
	String nickname = request.getParameter("nickName");
	String cpasswd = request.getParameter("cpassword");
	if(email.equals("")||passwd.equals("")||address.equals("")||name.equals("")||nickname.equals("")||cpasswd.equals("")){
		out.println("Please fill full the blank");
	}else if(!passwd.equals(cpasswd)){
		out.println("The passwords are not same!");
	}else{
		//update record
		%><jsp:useBean id="cus" scope="page" class="performReservation.Customer"/><%
		cus.setAddress(address);
		cus.setEmail(email);
		cus.setName(name);
		cus.setNickname(nickname);
		cus.setPasswd(passwd);
		SMMDBBean pProcess = SMMDBBean.getInstance();
		boolean b = pProcess.updateCustomer(cus);
		if(b){
			out.println("updated");
		}else{
			
		}
	}
%>
</body>
</html>